package com.strato.repository.monitor.v1_0_0;

public class FileChangeEvent {
	private String type;
	private String path;

	public FileChangeEvent(String path, String type) {
		super();
		this.type = type;
		this.path = path;
	}

	public String getType() {
		return type;
	}

	public String getPath() {
		return path;
	}

	@Override
	public int hashCode() {
		return (path+":"+type).hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if(obj==null){
			return false;
		}
		if(!(obj instanceof FileChangeEvent)){
			return false;
		}
		FileChangeEvent e=(FileChangeEvent) obj;
		return e.getPath().equals(path)&&e.getType().equals(type);
	}

	@Override
	public String toString() {
		return "FileChangeEvent [type=" + type + ", path=" + path + "]";
	}

}